<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
	<!-- Css -->
	<link rel="stylesheet" href="__CSS__/style.css">
	<link rel="stylesheet" href="__CSS__/sweetalert2.min.css">

	<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
	<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
	<!--[if lt IE 9]>
		<script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.min.js"></script>
		<script src="http://cdn.bootcss.com/respond.js/1.3.0/respond.min.js"></script>
	<![endif]-->
	<title>站点管理系统后台中心</title>
</head>

<body onLoad="document.login.username.focus();">
<div id="wrapper" class="login">
	<section id="login">
		<h1 class="logo text-hide">站点管理系统后台中心</h1>
		<div class="login-inner">
			<form method="post" name="login" action="">
				<p><input type="text" name="username" id="userName" size="24" class="login_put" placeholder="管理帐号" /></p>
				<p><input type="password" name="password" id="passWord" size="24" class="login_put" placeholder="管理密码" /></p>
				<p><input type="submit" class="submit" value="登陆后台" /></p>
			</form>
		</div>
		<div class="login-foot">
			后台使用过程中遇到问题或疑问，请联系我们！<span>Have questions.please contact us! </span>
		</div>
	</section>
</div>

	<!-- Javascript -->
	<script src="__JS__/Jquery.min.js"></script>
	<script src="__JS__/sweetalert2.min.js"></script>
	<script>
		$(function(){
			$('.submit').click(function(){
				event.preventDefault();
				var userName=$("#userName").val();
				var userPassword=$("#passWord").val();
				var url = "{:U('login')}";
				$.getJSON(url,{user_name:userName, user_password:userPassword},function(data){
					if(data.status==1){
						window.location.href = data.callback;
					}else{
						sweetAlert({
						  title: data.msg,
						  type: "error",
						  showCancelButton: false,
						}, function(){});
					}
				})
			})
		})
	</script>
</body>
</html>